package itheima.com.Demo01.demo01.Map;

import java.util.HashMap;
import java.util.Map;

public class MapTest03 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("张一","按摩");
        map.put("张二","桑拿");
        map.put("张三","针灸");
        map.put("张四","拔罐");

        boolean empty = map.isEmpty();
        System.out.println(empty);
        map.clear();
        boolean empty1 = map.isEmpty();
        System.out.println(empty1);

//        method01(map);
    }

    private static void method01(Map<String, String> map) {
        map.forEach(
                (String s,String ss)->{
                    System.out.println(s +"------"+ss);
                });
    }
}
